@@include('include/head.html')
<style>
h3{
    margin-bottom: 20px;
}
h3+.aiui-row{
    margin-bottom: 10px;
}
.aiui-dialog-scoll{
    max-height: 300px;
}
</style>
<div class="baui-tab baui-tab-brief baui-shadow" baui-filter="docDemoTabBrief">
    <div class="baui-tab-wrap">
        <div class="baui-tab-nav-scoll">
            <ul class="baui-tab-header">
                <li class="baui-active">弹出框</li>
            </ul>
        </div>
    </div>
    <div class="baui-tab-content">
        <h3>1.基本使用</h3>
        <div class="aiui-row">
            <button class="aiui-btn aiui-btn-default" id="info">提示消息框</button>
            <button class="aiui-btn aiui-btn-success" id="success">成功消息框</button>
            <button class="aiui-btn aiui-btn-warning" id="warning">警告消息框</button>
            <button class="aiui-btn aiui-btn-error" id="error">错误消息框</button>
        </div>
        <h3>2.远程html</h3>
        <div class="aiui-row">
            <button class="aiui-btn aiui-btn-default" id="html">这是远程获取的html</button>
        </div>
        <h3>3.iframe模式</h3>
        <div class="aiui-row">
            <button class="aiui-btn aiui-btn-default" id="iframe">有关闭按钮</button>
        </div>
    </div>
</div>
<script>
aiui.use(['popup'],function(popup){
    document.getElementById('html').addEventListener('click',function(e){
        popup.open({
            title:'提示',
            content:'http://0.0.0.0:8034/example/dialogcontent.html',
            type:2,
            onSuccess:function(){
                aiui.dialog.closeAll();
            }
        })
    })

    document.getElementById('iframe').addEventListener('click',function(e){
        popup.open({
            title:'提示',
            content:'http://layer.layui.com/mobile/index.html',
            type:2,
        })
    })

    document.getElementById('info').addEventListener('click',function(e){
        popup.open({
            title:'提示',
            content:'这是提示标志！',
            icon:'info'
        })
    })
    document.getElementById('success').addEventListener('click',function(e){
        popup.open({
            title:'提示',
            content:'这是成功标志！',
            icon:'success'
        })
    })
    document.getElementById('warning').addEventListener('click',function(e){
        popup.open({
            title:'提示',
            content:'这是预警标志?',
            icon:'warning'
        })
    })
    document.getElementById('error').addEventListener('click',function(e){
        popup.open({
            title:'提示',
            content:'这是错误标志?',
            icon:'error',
        })
    })
})
</script>
@@include('include/foot.html')